package com.vincent.dao;

import com.vincent.model.ArticleVisitLog;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * Created by Vincent on 2014/12/29.
 */
@Repository("articleVisitLogDao")
public class ArticleVisitLogDao {
    @Resource
    private ArticleVisitLogMapper articleVisitLogMapper;

    /**
     * 保存文章访问日志
     * @param log
     */
    public void save(ArticleVisitLog log){
        articleVisitLogMapper.insertSelective(log);
    }

    public void deleteByArticleId(Integer []ids){
        articleVisitLogMapper.deleteByArticleId(ids);
    }
}
